package cn.zebra.dev.sys.module.city.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;

/**
 * 城市联动
 *
 * @author runnable@sina.cn
 */
@Getter
@Setter
@ToString
@TableName("sys_city")
public class SysCityEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "上级城市id", hidden = true)
    private Long parentId;

    @ApiModelProperty("城市名")
    @NotBlank(message = "城市名不能为空!")
    private String cityName;

}
